<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>商品详情</title>
    <link rel="stylesheet" href="/api/css/swiper.css" />
    <link rel="stylesheet" type="text/css" href="/api/css/home.css">
    <script src="/api/js/swiper.min.js"></script>
    <script type="text/javascript"></script>
</head>
<body>
<div class="goods">
    <div class="goods-detail">
        <div class="goods-detail-info">
            <h3>商品信息</h3>
            <table cellspacing="2" cellpadding="2">
                <tbody>
                @for($i=0;$i<sizeof($product_attr_maps);$i++)
                    @if(($i%2)===0)
                     <tr>
                    @endif
                      <td>{{isset($product_attr_maps[$i]->attr_name)?$product_attr_maps[$i]->attr_name:''}}：{{isset($product_attr_maps[$i]->attr_value)?$product_attr_maps[$i]->attr_value:''}}</td>
                    @if(($i%2)!==0)
                    </tr>
                    @endif
                @endfor
                </tbody>
            </table>
        </div>
        @if(isset($temp_size_list)&&!empty($temp_size_list))
        <div class="goods-detail-size">
            <h3>尺码信息</h3>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    @foreach($temp_size_list as $temp_size)
                    <div class="swiper-slide">
                        @foreach($temp_size as $size_name)
                        <div class="cell">{{isset($size_name)?$size_name:''}}</div>
                         @endforeach
                    </div>
                   @endforeach
                </div>
            </div>
            <div class="swiper-button-prev swiper-button-black"></div>
            <div class="swiper-button-next swiper-button-black"></div>
        </div>
        @endif
        @if(isset($temp_size_format->measure_method_image))
            <div class="goods-detail-meter">
                <h3>测量方式</h3>
                <img src="{{isset($temp_size_format->measure_method_image)?$temp_size_format->measure_method_image:''}}">
            </div>
        @endif
    </div>
</div>

<script type="text/javascript">
    var swiper = new Swiper('.swiper-container', {
        slidesPerView: "auto",
        direction: 'horizontal',
        freeMode: true,
        // observer:true,
        observeParents:true,
        prevButton:'.swiper-button-prev',
        nextButton:'.swiper-button-next',
    });
</script>
</body>
</html>
